<!--
/**
* @name FormLoading
* @description 表单交互loadin,需要模态框，抽屉导等
* @author wind-lc
* @date 2020-02-18
* @param {Boolean} formLoadingVisible  是否显示
* @example 调用示例 <form-loading :formLoadingVisible="true"></form-loading>
*/
-->
<template>
  <div class="form-loading"
       v-show="formLoadingVisible">
    <a-spin />
  </div>
</template>
<script>
import { Spin } from 'ant-design-vue'
export default {
  name: 'FormLoading',
  components: {
    ASpin: Spin
  },
  props: {
    formLoadingVisible: {
      type: Boolean,
      required: true
    }
  },
  data () {
    return {}
  }
}
</script>
<style lang="scss">
.ant-modal-body {
  position: relative;
}
.form-loading {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 1;
  .ant-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
</style>
